<html>
<head><meta charset="utf-8"><title>updating private crates in a rust application · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/updating.20private.20crates.20in.20a.20rust.20application.html">updating private crates in a rust application</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248564167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/updating%20private%20crates%20in%20a%20rust%20application/near/248564167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Surya <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/updating.20private.20crates.20in.20a.20rust.20application.html#248564167">(Aug 06 2021 at 03:17)</a>:</h4>
<p>We have a private registry for inhouse crates.<br>
I would like my rust application to use the updated crate.</p>
<p>This is the crate in cargo.lock</p>
<div class="codehilite"><pre><span></span><code>name = &quot;api-contracts&quot;
version = &quot;0.0.2&quot;
source = &quot;registry+https://dl.cloudsmith.io/test/surya/crates/cargo/index.git&quot;
checksum = &quot;3cb6blahblah81b&quot;
</code></pre></div>
<p>I tried changing the version here and then tried <code>cargo clean</code> followed by <code>cargo build</code><br>
I also tried <code>cargo update</code><br>
I also tried deleting the <code>cargo.lock</code> file and then <code>cargo build</code></p>
<p>But the version is not getting updated.<br>
How do I update the version?</p>
<p>Any suggestion or please point me to relevant document.</p>
<p>Thanks</p>



<a name="248575068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/updating%20private%20crates%20in%20a%20rust%20application/near/248575068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/updating.20private.20crates.20in.20a.20rust.20application.html#248575068">(Aug 06 2021 at 06:12)</a>:</h4>
<p>When using 0.0.x, cargo considers any other 0.0.y incompatible. Only when the minor version is not 0 are patch version updates considered to be compatible. You will need to change <code>Cargo.toml</code> to update the version or use <code>cargo upgrade</code> to do this for you.</p>



<a name="248576228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/updating%20private%20crates%20in%20a%20rust%20application/near/248576228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Surya <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/updating.20private.20crates.20in.20a.20rust.20application.html#248576228">(Aug 06 2021 at 06:33)</a>:</h4>
<p>cargo.toml is actually different, there is nothing much in it.<br>
I think it is this way because this is a library. </p>
<div class="codehilite"><pre><span></span><code>[workspace]

members = [
    &quot;src/adapters/internal-folder-name1&quot;,
    &quot;src/ports/internal-folder-name2&quot;,
]
</code></pre></div>



<a name="248578718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/updating%20private%20crates%20in%20a%20rust%20application/near/248578718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Surya <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/updating.20private.20crates.20in.20a.20rust.20application.html#248578718">(Aug 06 2021 at 07:13)</a>:</h4>
<p>it works when cargo.toml of the corresponding subdirectory is updated.<br>
Thanks for the catch regarding minor version incompatibility <span class="user-mention" data-user-id="133247">@bjorn3</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>